<?php

namespace app\common\exception;

use think\exception\HttpException;

class AdminException extends HttpException
{
    protected $code = 400;
    protected array $headers = [];

    public function __construct($message = '服务器繁忙，请稍后再试。', $code = 400, $header = [])
    {
        $this->headers = $header;
        parent::__construct($code, $message, null, $header);
    }

    public function getHeaders()
    {
        return $this->headers;
    }
}